﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog.Master" AutoEventWireup="true"
    CodeBehind="CustomerInfoEdit.aspx.cs" Inherits="NetDon.OA.Portal.CRM.CustomerInfoEdit" %>

<%@ Register Src="../Controls/RequiredMark.ascx" TagName="RequiredMark" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <NetDon:FormPanel ID="panelCustomInfo" runat="server" CaptionAlign="NotSet" RepeatColumns="2">
        <Items>
            <NetDon:FormItem FullRow="True" HeaderVisible="False">
                <ContentTemplate>
                    <asp:Literal ID="Literal7" runat="server" Text="基本信息"></asp:Literal>
                    <div class="RealLine">
                    </div>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="客户编号">
                <ContentTemplate>
                    <asp:TextBox ID="txtCustomerCode" runat="server" Text='<%#Bind("CustomerCode") %>'
                        MaxLength="50"></asp:TextBox>
                    <uc1:RequiredMark ID="RequiredMark4" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtCustomerCode"
                        Display="None" ErrorMessage="请输入客户编号" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="客户名称">
                <ContentTemplate>
                    <asp:TextBox ID="txtCustomerName" runat="server" Text='<%#Bind("CustomerName") %>'
                        MaxLength="50"></asp:TextBox>
                    <uc1:RequiredMark ID="RequiredMark5" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtCustomerName"
                        Display="None" ErrorMessage="请输入客户名称" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="国别">
                <ContentTemplate>
                    <asp:RadioButtonList ID="radioNation" runat="server" RepeatColumns="2" AutoPostBack="true"
                        OnSelectedIndexChanged="radioNation_SelectedIndexChanged">
                        <asp:ListItem Text="国内" Value="China" Selected="True"></asp:ListItem>
                        <asp:ListItem Text="国外" Value="Foreign"></asp:ListItem>
                    </asp:RadioButtonList>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="所属省份" Key="Province">
                <ContentTemplate>
                    <asp:DropDownList ID="ddlProvince" runat="server" AppendDataBoundItems="true" DataTextField="Name"
                        DataValueField="Code">
                    </asp:DropDownList>
                    <asp:CascadingDropDown ID="ddlProvince_CascadingDropDown" runat="server" TargetControlID="ddlProvince"
                        ServicePath="~/CascadingService.asmx" ServiceMethod="GetProvinceContents" Category="Province"
                        SelectedValue='<%#Bind("Province") %>' PromptText="请选择省份" LoadingText="省份加载中...">
                    </asp:CascadingDropDown>
                    <uc1:RequiredMark ID="markProvince" runat="server" />
                    <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlProvince"
                        Display="None" ErrorMessage="请选择省份" SetFocusOnError="True"></asp:RequiredFieldValidator>--%>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="所属城市" Key="City">
                <ContentTemplate>
                    <asp:DropDownList ID="ddlCity" runat="server" AppendDataBoundItems="true" DataTextField="Name"
                        DataValueField="Code">
                    </asp:DropDownList>
                    <asp:CascadingDropDown ID="ddlCity_CascadingDropDown" runat="server" ParentControlID="ddlProvince"
                        ServicePath="~/CascadingService.asmx" ServiceMethod="GetCityContents" Category="City"
                        SelectedValue='<%#Bind("City") %>' TargetControlID="ddlCity" PromptText="请选择城市"
                        LoadingText="城市加载中...">
                    </asp:CascadingDropDown>
                    <uc1:RequiredMark ID="RequiredMark1" runat="server" />
                    <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlCity"
                        Display="None" ErrorMessage="请选择城市" SetFocusOnError="True"></asp:RequiredFieldValidator>--%>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="国家" Key="Internation" Visible="false">
                <ContentTemplate>
                    <asp:TextBox ID="txtInternation" runat="server" Text='<%#Bind("Internation") %>'
                        MaxLength="50"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="行业">
                <ContentTemplate>
                    <asp:DropDownList ID="ddlBusiness" DataSourceID="ddsBusiness" AppendDataBoundItems="True"
                        runat="server" DataTextField="Name" DataValueField="Value">
                    </asp:DropDownList>
                    <NetDon:DictionaryDataSource ID="ddsBusiness" runat="server" CategoryName="行业" EmptyItemType="Select">
                    </NetDon:DictionaryDataSource>
                    <uc1:RequiredMark ID="RequiredMark2" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddlBusiness"
                        Display="None" ErrorMessage="请选择行业" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="客户来源">
                <ContentTemplate>
                    <asp:TextBox ID="txtCustomerSource" Text='<%#Bind("CustomerSource") %>' runat="server">
                    </asp:TextBox>
                    <uc1:RequiredMark ID="RequiredMark3" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtCustomerSource"
                        Display="None" ErrorMessage="请输入客户来源" SetFocusOnError="True"></asp:RequiredFieldValidator>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem FullRow="True" HeaderVisible="False">
                <ContentTemplate>
                    <asp:Literal ID="Literal1" runat="server" Text="联系人信息"></asp:Literal>
                    <div class="RealLine">
                    </div>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="联系人姓名">
                <ContentTemplate>
                    <asp:TextBox ID="txtContactName" runat="server" Text='<%#Bind("ContactName") %>'
                        MaxLength="50"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="联系人职务">
                <ContentTemplate>
                    <asp:TextBox ID="txtContactPosition" runat="server" Text='<%#Bind("ContactPosition") %>'
                        MaxLength="50"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="手机">
                <ContentTemplate>
                    <asp:TextBox ID="txtMobile" runat="server" Text='<%#Bind("Mobile") %>' MaxLength="50"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="电话">
                <ContentTemplate>
                    <asp:TextBox ID="txtPhone" runat="server" Text='<%#Bind("Phone") %>' MaxLength="50"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="传真">
                <ContentTemplate>
                    <asp:TextBox ID="txtFax" runat="server" Text='<%#Bind("Fax") %>' MaxLength="50"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="电子邮箱">
                <ContentTemplate>
                    <asp:TextBox ID="txtEmail" runat="server" Text='<%#Bind("Email") %>' MaxLength="50"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                        SetFocusOnError="true" Display="None" ValidationExpression="^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"
                        ErrorMessage="电子邮箱格式不正确"></asp:RegularExpressionValidator>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem FullRow="True" HeaderVisible="False">
                <ContentTemplate>
                    <asp:Literal ID="Literal2" runat="server" Text="单位信息"></asp:Literal>
                    <div class="RealLine">
                    </div>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="通讯地址">
                <ContentTemplate>
                    <asp:TextBox ID="txtAddress" runat="server" Text='<%#Bind("Address") %>'></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="邮政编码">
                <ContentTemplate>
                    <asp:TextBox ID="txtZipcode" runat="server" Text='<%#Bind("Zipcode") %>' MaxLength="50"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="单位网站" ColumnSpan="2">
                <ContentTemplate>
                    <asp:TextBox ID="txtWebsite" runat="server" Text='<%#Bind("Website") %>' MaxLength="50">
                    </asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="客户基本介绍" ColumnSpan="2">
                <ContentTemplate>
                    <asp:TextBox ID="txtIntroduction" runat="server" TextMode="MultiLine" Text='<%#Bind("Introduction") %>'
                        Width="400px" Height="70px"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
            <NetDon:FormItem HeaderText="备注" ColumnSpan="2">
                <ContentTemplate>
                    <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Text='<%#Bind("Remark") %>'
                        Width="400px" Height="70px"></asp:TextBox>
                </ContentTemplate>
            </NetDon:FormItem>
        </Items>
    </NetDon:FormPanel>
    <div style="padding-top: 10px">
        <center>
            <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click"></asp:Button>
            <asp:Button ID="btnReturn" runat="server" Text="返回" CausesValidation="false"></asp:Button>
            <NetDon:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="true"
                ShowSummary="false" />
        </center>
    </div>
</asp:Content>
